<?php
namespace app\admin\validate;


use think\facade\Session;
use think\Validate;

class Login extends Validate
{
    protected $rule = [
        'username'  =>  'require|chsDash',
        'password'  =>  'length:4,25',
        'verify'    =>  'require|captcha',
        '__token__' =>  'token',
    ];

    protected $message = [
        'username.require'      =>  '用户名必须填写',
        'username.chsDash'      =>  '用户名格式错误',
        'password.length'       =>  '密码长度不符, 4-25个字符',
        'verify.require'        =>  '验证码不能为空',
        'verify.captcha'        =>  '验证码错误',
    ];
}